
class Person{
    private  String name;
    private int age;
    Person(){

    }
    Person(String name , int age){
        this.name=name;
        this.age=age;
    }
    public void setName(String name){
        this.name=name;
    }
//    public String getName(){
//        return name;
//    }
    public void setAge(int age){
        this.age=age;
    }
//    public int getAge(){
//        return age;
//    }
    void speak(){
        System.out.println("姓名为："+name);
        System.out.println("年龄为："+age);
    }
}
public class T4 {
    public static void main(String[] args) {
        Person p1 = new Person("a",19);
        p1.speak();
    }
}
